include ../Makefile.shared

define PROJ_ext
  SOURCES = timer.ml heap.ml ext.ml ext.mli
  RESULT = ext
endef
export PROJ_ext

# If the environment does not define subprojects to handle,
# then set a default
ifndef SUBPROJS
  export SUBPROJS = ext
endif

interface:
	ocamlc -i ext.ml > ext.mli

# Default target to use
all: ncl
	cp ext.cmi ext.cmxa ext.mli ext.a $(SRCLIBDIR)

# Catch-all target will be applied to all subprojects automatically
%:
	@$(MAKE) -f $(OCAMLMAKEFILE) subprojs SUBTARGET=$@
